﻿using System.IO;
using System.Text;

namespace BBB.Valuta.Savers
{
    public class FileSaver : Saver
    {
        public FileSaver(string fileName)
        {
            FileName = fileName;
        }
        public string FileName { get; set; }

        public override void Execute()
        {
            using (StreamWriter sw = new StreamWriter(FileName, false, Encoding.GetEncoding(866)))
            {
                sw.Write(Body);
                sw.Flush();
            }
        }
    }
}
    

